var QQWubi = function(phraseArr){
    this.phraseArr = phraseArr;
}

QQWubi.prototype.getMainPhraseBuff = function (){
    var pBody = [];
	var i = 0;
    var order = 0;
    var chReg = new RegExp("^([\\u4e00-\\u9fa5]+)$");
    for(var phrase of this.phraseArr){
		var code = phrase[0];
        var alphaIndex = code.charCodeAt(0) - 97;
        // if(alphaIndex <= 24){continue;}
        for(i = 1, order = 1; i < phrase.length; i++, order++){
			var term = phrase[i];
			var sgArr = this.getSingleBuff(code, term, order);
            if(alphaIndex>24 || !chReg.test(term)){
                Array.prototype.push.apply(pBody, sgArr);
            }
        }
    }
    var pHead = [0xff, 0xfe];
	pHead = pHead.concat(pBody);
    return pHead;
}

QQWubi.prototype.getSingleBuff = function (code, term, order){
    var arr = [];
    Array.prototype.push.apply(arr, PhraseUtil.getStrBuff(code));
    Array.prototype.push.apply(arr, PhraseUtil.getStrBuff("=" + order + ","));
	Array.prototype.push.apply(arr, PhraseUtil.getStrBuff(term));
    Array.prototype.push.apply(arr, [0x0d, 0x00, 0x0a, 0x00]);
    return arr;
}